package com.appspot.zarm.game;


public class PlayerPair {

	private Player player1;
	private Player player2;

	public PlayerPair(Player player1, Player player2) {
		this.player1 = player1;
		this.player2 = player2;
	}
	
	public Player getPlayer1() {
		return player1;
	}

	public Player getPlayer2() {
		return player2;
	}

	public boolean equals(Object another){
		PlayerPair anotherPlayerPair = (PlayerPair) another;
		return player1.equals( anotherPlayerPair.getPlayer1() ) && player2.equals( anotherPlayerPair.getPlayer2() );
	}
	
	public int hashCode(){
		return (player1.getId() + player2.getId()).hashCode(); 
	}
}
